package priv.winnine.entity.bo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import lombok.SneakyThrows;
import org.springframework.http.MediaType;

@Getter
@Setter
@Builder
public class RequestInfo {

    /**
     * Accept
     */
    @JsonIgnore
    private MediaType accept;

    private String acceptValue;

    /**
     * Content-Type
     */
    @JsonIgnore
    private MediaType contentType;

    private String contentTypeValue;

    /**
     * Authorization
     */
    private String authorization;

    /**
     * Signature
     */
    private String signature;

    /**
     * Security-Identifiers
     */
    private String sid;

    /**
     * Timestamp
     */
    private String timestamp;

    /**
     * BaseRequest
     */
    private String baseRequestString;

    @SneakyThrows
    @Override
    public String toString() {
        return new ObjectMapper().writeValueAsString(this);
    }

}
